<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,user-scalable=no">
    <meta name="keywords" content="xx,xx,xx"/>
    <meta name="description" content="yyyyyyy"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta property="qc:admins" content="70003766576320416375"/>
    <meta name="format-detection" content="telephone=no">
    <title>简历</title>
    <link rel="stylesheet" href="../../css/base/jquery-ui-1.10.3.css" type="text/css">
    <link rel="stylesheet" href="../../plugin/bootstrap-3.3.7/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/job.css">
    <link rel="stylesheet" href="../../css/resume.css">
    <script src="http://gosspublic.alicdn.com/aliyun-oss-sdk-4.3.0.min.js"></script>
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body style="background: #f7f7f9">
<div class="container-fluid" style="background-color: #f7f7f9">
    <!--header start-->
    <div class="row header">
        <div><span id="back" class="glyphicon  glyphicon-chevron-left"
                   style="float: left;cursor: pointer;"></span><span>新增简历</span></div>
    </div>
    <!--header end-->

    <!--content start-->
    <div class="row content">
        <div class="resume-name">
            <h6>简历名字<span class="glyphicon glyphicon-star" style="color: red;"></span></h6>

            <div>
                <input placeholder="给自己简历取个名字（如服务员）" style="width: 100%;">
            </div>
        </div>
        <div class="head-portrait">
            <h6>添加头像</h6>

            <div class="head-portrait-content">
                      <span>
                           <label>
                               <img id="portrait2" src="../../images/cartoon-head.jpg" height="50" width="50">
                               <small>上传头像</small>
                               <input type="file" id="file" style="display: none" onchange="on_click_upload_file()"
                                      name="" value="">
                           </label>
                      </span>
            </div>
        </div>
        <div class="essential-information">
            <h6>基本信息 <span class="glyphicon glyphicon-star" style="color: red;"></span></h6>

            <div class="essential-information-content">
                <div><label>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名：<input type="text" placeholder="如张三"></label>
                </div>
                <div><label>姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;别：<input type="text" placeholder="男/女"></label>
                </div>
                <div><label>最高学历：<input type="text" placeholder="如本科"></label></div>
                <div><label>工作年限：<input type="text" placeholder="如2年"></label></div>
                <div><label>出生年份：<input type="text" placeholder="如1993年"></label></div>
                <div><label>所住地址：<input type="text" placeholder="如奉贤区海湾镇 "></label></div>
                <div><label>联系电话：<input type="text" placeholder=""></label></div>
                <div><label>联系邮箱：<input type="text" placeholder=""></label></div>
            </div>
        </div>
        <div class="work-experience">
            <h6>工作/实习经历<span class="glyphicon glyphicon-star" style="color: red;"></span></h6>

            <div class="work-experience-content">
                <ul>
                    <li>
                        <div>
                            <h6>
                                <input type="text" placeholder="如2016年3月-2016年7月">
                            </h6>
                            <textarea
                                    onfocus="window.activeobj=this;this.clock=setInterval(function(){activeobj.style.height=activeobj.scrollHeight+'px';},200);"
                                    onblur="clearInterval(this.clock);"
                                    placeholder="如上海悦华大酒店做服务员（此处写内容）...."></textarea>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
        <div class="help-job">
            <h6>期望的岗位信息<span class="glyphicon glyphicon-star" style="color: red;"></span></h6>

            <div class="help-job-content">
                <h6>
                    <input type="text" placeholder="如酒店服务员">
                </h6>
                <textarea
                        onfocus="window.activeobj=this;this.clock=setInterval(function(){activeobj.style.height=activeobj.scrollHeight+'px';},200);"
                        onblur="clearInterval(this.clock);" placeholder="如全职/南桥/3-4k"></textarea>
            </div>
        </div>
        <div class="self-introduction">
            <h6>自我评价</h6>

            <div class="help-job-content" style="padding-top: 40px;">
                <textarea
                        onfocus="window.activeobj=this;this.clock=setInterval(function(){activeobj.style.height=activeobj.scrollHeight+'px';},200);"
                        onblur="clearInterval(this.clock);" placeholder="如性格开朗，做事踏实，积极阳光，为人正直，热爱服务员职位......"></textarea>
            </div>
        </div>
    </div>
    <!--content end-->
</div>
<div style="position: relative">
    <a class="btn" id="send-evaluate">保存简历</a>
</div>
</body>
<script src="../../js/common/jquery-2.1.4.min.js"></script>
<script src="../../js/resume.js" type="text/javascript"></script>
<script src="../../js/index.js"></script>
<script src="../../plugin/bootstrap-3.3.7/dist/js/bootstrap.min.js"></script>
<script>
    $('#send-evaluate').click(function () {
        var resume = {};
        var resume_name = $('.resume-name div input')[0].value;//简历名称
        if (resume_name != '') {

            var photo = $('.head-portrait-content label img').attr('src');//头像

            var arr_inputs = $('.essential-information-content div label input');//基本信息
            var essential_info = '';
            var arr = ['userName', 'sex', 'education', 'working', 'birth', 'address', 'tel', 'email'];
            for (var i1 = 0; i1 < arr_inputs.length; i1++) {
                essential_info += arr[i1] + ":" + arr_inputs[i1].value + ",";
            }
            var work_experience_time = $('.work-experience-content ul li div h6 input');//工作经验
            var work_experience_content = $('.work-experience-content ul li div textarea');
            var work_experience = '';
            for (var i2 = 0; i2 < work_experience_time.length; i2++) {
                work_experience += work_experience_time[i2].value + '#' + work_experience_content[i2].value + ',';
            }

            var hope_job_content = $('.help-job div h6 input');//期望工作
            var hope_job_details = $('.help-job div textarea');
            var hope_job = hope_job_content[0].value + '#' + hope_job_details[0].value;

            var self_introduction = $('.self-introduction div textarea')[0].value;//自我评价

            resume = {
                "resumeName": resume_name,
                "photo": photo,
                "essentialInfo": essential_info,
                "workExp": work_experience,
                "expectPost": hope_job,
                "selfAssessment": self_introduction
            };

            var url = server + '/server/resume/setUpResume.json';
            $.post(url, resume, function (data) {
                if (data.code == 20000) {
                    window.location.replace('./resume-list.html')
                }
            });
        }
        else {
            alert('请填写简历名称');
        }
    });
</script>
<script src="../../js/common/common.js"></script>
<script src="../../js/edit-resume.js"></script>
</html>